CC		= gcc
STRIP	= strip -s
CFLAGS	= -Wall -Wshadow -march=pentium -O3 -fomit-frame-pointer -mtune=pentium
LDFLAGS	= -Wl,-O1 -lpthread -lssl -lxml2
TARGET	= cli_app
OBJS	= cli.o
OBJS	+=cmd.o
OBJS	+=device.o
OBJS	+=cli.o
OBJS	+=buf_misc.o
OBJS	+=cli_main.o
OBJS	+=xml_conf.o
OBJS	+=fastlz.o
all: $(TARGET)

%.o : %.c
	$(CC) $(CFLAGS) -c -o $@ $^

$(TARGET): $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
	$(STRIP) $(TARGET)
clean:
	rm -f *.o $(TARGET) *.tmp
